function validateSearch(isAdvSrch) {
    if (isAdvSrch) {
        var pnum = document.getElementById("as_pnum").value;
        var ptitle = document.getElementById("as_ptitle").value;
        var pinventor = document.getElementById("as_pinventor").value;
        var passignee = document.getElementById("as_passignee").value;
        var puscls = document.getElementById("as_puscls").value;
        var pintlcls = document.getElementById("as_pintlcls").value;

        if (pnum == "" && ptitle == "" && pinventor == "" && passignee == "" && puscls == "" && pintlcls == "") {
            return false;
        }
    } else {
        var queryField = document.getElementById("q_field");
        if (queryField != undefined && queryField != null) {
        	var q = queryField.value.replace(/^\s+|\s+$/, '');        
            if (q == "") {
                return false;
            }
        }
    }
    return true;
}